1 TADPOLE and ROC PLOTS

1.0.1 Loading the libraries

library("FRESA.CAD")
library(survival)
library(readxl)
library(igraph)
op <- par(no.readonly = TRUE)
pander::panderOptions('digits', 3)
pander::panderOptions('table.split.table', 400)
pander::panderOptions('keep.trailing.zeros',TRUE)

1.1 Loading ALL Results

load("~/GitHub/SurvivalTadpole/RMDS/TADPOLE_BESS_Results.RData")
load("~/GitHub/SurvivalTadpole/RMDS/TADPOLE_LASSO_Results.RData")
load("~/GitHub/SurvivalTadpole/RMDS/TADPOLE_BSWIMS_Results.RData")


par(op)


survmtest <- cvLASSORaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinLASSO <- predictionStats_binary(survmtest[,c(2,3)],"LASSO: MCI to  AD Conversion")


survmtest <- cvRIDGERaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinRIDGE <- predictionStats_binary(survmtest[,c(2,3)],"RIDGE: MCI to  AD Conversion")


survmtest <- cvBESSRaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinBESS <- predictionStats_binary(survmtest[,c(2,3)],"BESS:BIC: MCI to  AD Conversion")


survmtest <- cvBESSERaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinBESSEBIC <- predictionStats_binary(survmtest[,c(2,3)],"BESS:EBIC: MCI to  AD Conversion")


survmtest <- cvBESSGSERaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinBESSGS <- predictionStats_binary(survmtest[,c(2,3)],"BESS:GS: MCI to  AD Conversion")


survmtest <- cvBSWiMSRaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]

prBinBSWiMS <- predictionStats_binary(survmtest[,c(2,3)],"MCI to  AD Conversion")


par(new=TRUE)
plot(prBinLASSO$ROC.analysis$roc.predictor,col="red")
par(new=TRUE)
plot(prBinRIDGE$ROC.analysis$roc.predictor,col="pink")
par(new=TRUE)
plot(prBinBESS$ROC.analysis$roc.predictor,col="blue")
par(new=TRUE)
plot(prBinBESSEBIC$ROC.analysis$roc.predictor,col="cyan")
par(new=TRUE)
plot(prBinBESSGS$ROC.analysis$roc.predictor,col="gold")
legend("bottomright",
       legend=c("BSWiMS","LASSO","RIDGE","BIC","EBIC","GS"),
       lty=1,
       col=c("black","red","pink","blue","cyan","gold"),cex=0.85)

1.1.1 ROC Tests

pander::pander(roc.test(prBinLASSO$ROC.analysis$roc.predictor,prBinBSWiMS$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinLASSO$ROC.analysis$roc.predictor and prBinBSWiMS$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
0.314 0.753 two.sided 0.875 0.874
pander::pander(roc.test(prBinLASSO$ROC.analysis$roc.predictor,prBinBESSEBIC$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinLASSO$ROC.analysis$roc.predictor and prBinBESSEBIC$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
3.96 7.48e-05 * * * two.sided 0.875 0.832
pander::pander(roc.test(prBinLASSO$ROC.analysis$roc.predictor,prBinBESSGS$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinLASSO$ROC.analysis$roc.predictor and prBinBESSGS$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
3.6 0.000315 * * * two.sided 0.875 0.838
pander::pander(roc.test(prBinLASSO$ROC.analysis$roc.predictor,prBinBESS$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinLASSO$ROC.analysis$roc.predictor and prBinBESS$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
3.96 7.48e-05 * * * two.sided 0.875 0.832
pander::pander(roc.test(prBinLASSO$ROC.analysis$roc.predictor,prBinRIDGE$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinLASSO$ROC.analysis$roc.predictor and prBinRIDGE$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
9.51 1.91e-21 * * * two.sided 0.875 0.591

pander::pander(roc.test(prBinBSWiMS$ROC.analysis$roc.predictor,prBinBESSEBIC$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinBSWiMS$ROC.analysis$roc.predictor and prBinBESSEBIC$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
3.95 7.97e-05 * * * two.sided 0.874 0.832
pander::pander(roc.test(prBinBSWiMS$ROC.analysis$roc.predictor,prBinBESSGS$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinBSWiMS$ROC.analysis$roc.predictor and prBinBESSGS$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
3.59 0.000333 * * * two.sided 0.874 0.838
pander::pander(roc.test(prBinBSWiMS$ROC.analysis$roc.predictor,prBinBESS$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinBSWiMS$ROC.analysis$roc.predictor and prBinBESS$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
3.95 7.97e-05 * * * two.sided 0.874 0.832
pander::pander(roc.test(prBinBSWiMS$ROC.analysis$roc.predictor,prBinRIDGE$ROC.analysis$roc.predictor))
DeLong’s test for two correlated ROC curves: prBinBSWiMS$ROC.analysis$roc.predictor and prBinRIDGE$ROC.analysis$roc.predictor
Test statistic P value Alternative hypothesis AUC of roc1 AUC of roc2
9.44 3.86e-21 * * * two.sided 0.874 0.591

1.2 Summary tables

1.2.1 MCI to Dementia table


selFeatures <- names(cvBSWiMSRaw$featureFrequency[cvBSWiMSRaw$featureFrequency>5])

clusterFeatures <- fc$names


tableMCI_to_Dem <- sm$coefficients[clusterFeatures,
                                   c("Estimate",
                                     "lower",
                                     "HR",
                                     "upper",
                                     "full.AUC",
                                     "Delta.AUC",
                                     "z.IDI",
                                     "Frequency")]

nugget <- fc$membership
names(nugget) <- clusterFeatures

tableMCI_to_Dem$Cluster <- nugget[rownames(tableMCI_to_Dem)]
tableMCI_to_Dem$CVFreq <- cvBSWiMSRaw$featureFrequency[clusterFeatures]

rnames <- clusterFeatures[str_detect(clusterFeatures,"ST")]
frnames <- rnames
rnames <- str_replace_all(rnames,"M_","")
rnames <- str_replace_all(rnames,"RD_","")
rnames <- str_replace_all(rnames,"Ba_","")
rnames <- str_replace_all(rnames,"De_","")
description <- character()

for (ddet in c(1:length(rnames)))
{
  description <- c(description,TADPOLE_D1_D2_Dict$TEXT[str_detect(TADPOLE_D1_D2_Dict$FLDNAME,rnames[ddet])][1])
}
names(description) <- frnames

tableMCI_to_Dem$Description <- description[rownames(tableMCI_to_Dem)]
pander::pander(tableMCI_to_Dem)
  Estimate lower HR upper full.AUC Delta.AUC z.IDI Frequency Cluster CVFreq Description
FAQ 2.46e-01 1.273 1.581 1.963 0.800 0.032788 4.22 1.00 1 50 NA
RAVLT_immediate -3.44e-01 0.400 0.527 0.695 0.800 0.013008 5.36 1.00 1 50 NA
ABETA -2.08e-01 0.541 0.679 0.853 0.800 -0.007637 3.76 1.00 1 49 NA
M_ST56SA -2.16e-01 0.586 0.693 0.819 0.797 0.008198 4.31 1.00 1 12 Surface Area of LeftSuperiorFrontal
ADAS13 1.24e-01 1.130 1.501 1.993 0.808 -0.000754 2.44 0.90 1 48 NA
PTAU 1.38e-02 1.165 1.399 1.680 0.798 0.007735 3.44 0.90 1 48 NA
TAU 3.14e-01 1.224 1.465 1.753 0.793 0.010720 4.37 0.80 2 45 NA
M_ST13TA -2.04e-01 0.572 0.659 0.760 0.794 0.027437 5.44 0.75 1 16 Cortical Thickness Average of LeftBankssts
ADAS11 1.91e-01 1.463 1.789 2.189 0.782 0.025417 5.96 0.65 2 44 NA
RD_ST34CV -8.86e-02 0.683 0.779 0.888 0.806 0.020088 3.90 0.65 1 20 Volume (Cortical Parcellation) of LeftIsthmusCingulate
RD_ST49SA -8.66e-02 0.699 0.804 0.925 0.800 0.007946 2.95 0.65 1 5 Surface Area of LeftPostcentral
M_ST29SV -1.17e-01 0.500 0.643 0.826 0.782 0.005547 3.69 0.60 2 29 Volume (WM Parcellation) of LeftHippocampus
APOE4 3.15e-01 1.357 2.063 3.136 0.777 0.011835 3.41 0.60 2 28 NA
M_ST56CV -2.26e-02 0.694 0.782 0.881 0.775 0.007591 2.79 0.55 2 13 Volume (Cortical Parcellation) of LeftSuperiorFrontal
M_ST11SV -1.56e-01 0.625 0.736 0.868 0.784 0.013446 3.66 0.45 2 13 Volume (WM Parcellation) of LeftAccumbensArea
M_ST14TS 5.94e-02 1.094 1.252 1.433 0.782 0.007519 3.07 0.40 2 7 Cortical Thickness Standard Deviation of LeftCaudalAnteriorCingulate
RD_ST34SA -1.02e-01 0.619 0.750 0.911 0.780 0.016271 2.80 0.35 2 4 Surface Area of LeftIsthmusCingulate
M_ST59SA -8.52e-02 0.645 0.754 0.883 0.782 -0.000775 3.96 0.30 2 5 Surface Area of LeftSupramarginal
RAVLT_perc_forgetting 7.07e-02 1.224 1.684 2.319 0.762 0.012586 3.85 0.25 2 22 NA
M_ST24CV -1.02e-01 0.557 0.689 0.852 0.784 0.010169 3.50 0.15 2 31 Volume (Cortical Parcellation) of LeftEntorhinal
M_ST13CV -4.86e-13 0.682 0.786 0.907 0.787 -0.006338 3.28 0.15 1 7 Volume (Cortical Parcellation) of LeftBankssts
MMSE -3.99e-02 0.610 0.745 0.911 0.762 0.019400 2.76 0.10 3 12 NA
M_ST12SV -3.66e-02 0.581 0.711 0.869 0.762 0.022628 3.58 0.10 4 13 Volume (WM Parcellation) of LeftAmygdala
RD_ST15TS -5.97e-02 0.661 0.773 0.903 0.790 0.008388 3.36 0.10 5 7 Cortical Thickness Standard Deviation of LeftCaudalMiddleFrontal
M_ST26CV -1.95e-13 0.620 0.749 0.905 0.755 -0.017097 2.99 0.05 6 16 Volume (Cortical Parcellation) of LeftFusiform
M_ST39CV -9.17e-14 0.814 0.873 0.936 0.794 0.011278 3.83 0.05 7 12 Volume (Cortical Parcellation) of LeftMedialOrbitofrontal
M_ST59CV -1.68e-13 0.693 0.780 0.876 0.792 0.013338 4.16 0.05 8 7 Volume (Cortical Parcellation) of LeftSupramarginal
M_ST39SA -4.15e-14 0.904 0.940 0.978 0.783 0.007519 3.10 0.05 9 NA Surface Area of LeftMedialOrbitofrontal

1.2.2 Heat map


hm <- heatMaps(Outcome="status",data=TADPOLECrossMRI[,c("status",clusterFeatures)],title="Heat Map",Scale=TRUE,
                       theFiveColors=c("black","red","orange","yellow","white"),
#                      theFiveColors=c("darkred","red","yellow","blue","darkblue"),
                       hCluster="col",
                       cexRow=0.50,cexCol=0.65,srtCol=35,
                       ylab="Subjects",
                       xlab="Features"
                       )

1.2.3 Heat map


hm <- heatMaps(Outcome="status",data=TADPOLECrossMRI,title="Heat Map",Scale=TRUE,
                       theFiveColors=c("black","red","orange","yellow","white"),
#                      theFiveColors=c("darkred","red","yellow","blue","darkblue"),
                       hCluster="col",
                       cexRow=0.50,cexCol=0.5,srtCol=35,
                       ylab="Subjects",
                       xlab="Features"
                       )

1.3 Feature Analysis


fs <- bConvml$bagging$frequencyTable
barplot(fs[order(-fs)],las=2,main="Selected Features",cex.names = 0.5)

sm <- summary(bConvml)
summary(TADPOLE_Conv_TRAINNorm$M_ST39CV)
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#> -2.7659 -0.5863  0.2002  0.0000  0.6914  2.4492
pander::pander(bConvml$formula.list)

Surv(TimeToEvent, status) ~ 1 + FAQ + RAVLT_immediate + ADAS13 + ABETA + PTAU + M_ST13TA + M_ST56SA + RD_ST34CV + RD_ST49SA, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + RD_ST34SA + M_ST29SV + M_ST56CV + APOE4, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + ADAS13 + FAQ + RAVLT_immediate + ABETA + PTAU + M_ST56SA + M_ST13TA + RD_ST49SA + RD_ST34CV, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + RAVLT_immediate + FAQ + ADAS13 + ABETA + PTAU + M_ST56CV, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + M_ST29SV + RD_ST34SA + M_ST14TS + M_ST11SV + M_ST56SA + APOE4, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + RAVLT_immediate + ABETA + PTAU + M_ST56SA + M_ST13TA + RD_ST34CV, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + ADAS13 + FAQ + RAVLT_immediate + ABETA + PTAU + M_ST59CV + M_ST11SV + M_ST56SA + RD_ST49SA, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + M_ST29SV + M_ST56CV + APOE4, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + RAVLT_immediate + ADAS13 + FAQ + ABETA + M_ST56SA + M_ST13TA + PTAU, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + M_ST11SV + M_ST56CV + M_ST24CV + M_ST59SA + RD_ST49SA + APOE4 + RD_ST34SA, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + ADAS13 + RAVLT_immediate + ABETA + TAU + M_ST39CV + M_ST56SA + RD_ST34CV + M_ST13CV, Surv(TimeToEvent, status) ~ 1 + ADAS11 + PTAU + RAVLT_perc_forgetting + M_ST29SV + M_ST11SV + M_ST14TS + M_ST59SA + RD_ST49SA, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + ADAS13 + FAQ + RAVLT_immediate + M_ST56SA + ABETA + TAU + M_ST13CV + M_ST39SA, Surv(TimeToEvent, status) ~ 1 + ADAS11 + APOE4 + M_ST56CV + PTAU + M_ST12SV, Surv(TimeToEvent, status) ~ 1 + RAVLT_perc_forgetting + M_ST29SV + M_ST13TA + MMSE + RD_ST34SA + M_ST14TS + M_ST59SA, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + RAVLT_immediate + FAQ + ADAS13 + ABETA + M_ST56CV + PTAU, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + M_ST29SV + M_ST11SV + M_ST14TS + M_ST56SA + RD_ST34SA, Surv(TimeToEvent, status) ~ 1 + RAVLT_perc_forgetting + MMSE + M_ST12SV + APOE4 + M_ST13TA, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + RAVLT_immediate + ABETA + M_ST56SA + M_ST13TA + RD_ST15TS + TAU + RD_ST34CV, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + RAVLT_immediate + ADAS13 + ABETA + PTAU + M_ST56SA + M_ST13TA + RD_ST34CV + RD_ST49SA, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + RAVLT_perc_forgetting + M_ST56CV + APOE4 + M_ST29SV + M_ST14TS, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + ADAS13 + FAQ + RAVLT_immediate + M_ST56SA + ABETA + M_ST13TA + PTAU + RD_ST34CV + RD_ST49SA, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + ADAS13 + RAVLT_immediate + M_ST56SA + PTAU + ABETA + M_ST13TA + RD_ST49SA + RD_ST34CV, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + M_ST56CV + M_ST14TS + M_ST29SV + APOE4, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + ADAS13 + RAVLT_immediate + ABETA + M_ST56SA + M_ST13TA + PTAU + RD_ST34CV + RD_ST49SA, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + RD_ST34SA + M_ST56CV + APOE4 + RAVLT_perc_forgetting + M_ST29SV + M_ST14TS, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + ADAS13 + RAVLT_immediate + ABETA + M_ST56SA + PTAU + M_ST13TA + RD_ST34CV + RD_ST49SA, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + RAVLT_immediate + ABETA + TAU + M_ST11SV + M_ST59SA + RD_ST15TS + M_ST24CV, Surv(TimeToEvent, status) ~ 1 + ADAS13 + PTAU + M_ST56SA + M_ST29SV + M_ST26CV, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + ADAS13 + RAVLT_immediate + FAQ + M_ST56SA + M_ST13TA + ABETA + PTAU + RD_ST34CV + RD_ST49SA, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + RD_ST34SA + M_ST11SV + M_ST29SV + APOE4 + M_ST59SA, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + ADAS13 + RAVLT_immediate + ABETA + PTAU + M_ST56CV + M_ST13CV, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + M_ST29SV + M_ST11SV + M_ST56SA + APOE4 + M_ST14TS, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + RAVLT_immediate + FAQ + ADAS13 + ABETA + TAU + M_ST56SA + M_ST13TA + RD_ST34CV + RD_ST49SA, =-=End=-=, Surv(TimeToEvent, status) ~ 1 + FAQ + ADAS13 + RAVLT_immediate + M_ST56SA + ABETA + PTAU + M_ST13TA + RD_ST34CV + RD_ST49SA, Surv(TimeToEvent, status) ~ 1 + ADAS11 + TAU + M_ST56CV + M_ST11SV + APOE4 + M_ST24CV + M_ST59SA and =-=End=-=

pander::pander(bConvml$bagging$predfit$coef)
V1 V3 V5 V10 V14 V15 V18 V19 V28 V29 V34
0.061 5.89e-17 0.35 0.136 -0.262 0.0422 0.159 0.0733 0.27 -0.021 0.392
cnames <- names(bConvml$bagging$bagged.model$coefficients)
pander::pander(cbind(
                      bConvml$bagging$bagged.model$coefficients,
                      bConvml$bagging$bagged.model$baggingAnalysis$coefficients[cnames],
                      bConvml$bagging$bagged.model$baggingAnalysis$wts[cnames],
                      bConvml$bagging$bagged.model$baggingAnalysis$avgLogPvalues[cnames],
                      bConvml$bagging$bagged.model$baggingAnalysis$RelativeFrequency[cnames])
)
(Intercept) 0.00e+00 NA NA NA NA
FAQ 2.46e-01 0.4578 3.98e-02 4.77 1.00
RAVLT_immediate -3.44e-01 -0.6401 3.98e-02 5.57 1.00
ABETA -2.08e-01 -0.3869 3.98e-02 3.35 1.00
M_ST56SA -2.16e-01 -0.3667 4.38e-02 5.06 1.00
ADAS13 1.24e-01 0.4061 2.52e-02 2.60 0.90
PTAU 1.38e-02 0.3358 3.39e-03 3.80 0.90
TAU 3.14e-01 0.3815 7.64e-02 4.80 0.80
M_ST13TA -2.04e-01 -0.4165 4.85e-02 8.36 0.75
ADAS11 1.91e-01 0.5819 3.74e-02 8.11 0.65
RD_ST34CV -8.86e-02 -0.2497 4.05e-02 4.03 0.65
RD_ST49SA -8.66e-02 -0.2180 4.54e-02 2.94 0.65
M_ST29SV -1.17e-01 -0.4415 3.27e-02 3.56 0.60
APOE4 3.15e-01 0.7243 5.38e-02 3.46 0.60
M_ST56CV -2.26e-02 -0.2461 1.24e-02 4.59 0.55
M_ST11SV -1.56e-01 -0.3062 8.40e-02 3.89 0.45
M_ST14TS 5.94e-02 0.2248 4.90e-02 3.26 0.40
RD_ST34SA -1.02e-01 -0.2870 7.55e-02 2.74 0.35
M_ST59SA -8.52e-02 -0.2818 7.48e-02 3.67 0.30
RAVLT_perc_forgetting 7.07e-02 0.5214 4.03e-02 3.16 0.25
M_ST24CV -1.02e-01 -0.3723 1.36e-01 3.54 0.15
M_ST13CV -4.86e-13 -0.2404 1.00e-12 3.33 0.15
MMSE -3.99e-02 -0.2940 1.01e-01 2.69 0.10
M_ST12SV -3.66e-02 -0.3418 7.96e-02 3.35 0.10
RD_ST15TS -5.97e-02 -0.2581 1.72e-01 3.23 0.10
M_ST26CV -1.95e-13 -0.2891 1.00e-12 2.86 0.05
M_ST39CV -9.17e-14 -0.1361 1.00e-12 4.20 0.05
M_ST59CV -1.68e-13 -0.2491 1.00e-12 4.81 0.05
M_ST39SA -4.15e-14 -0.0615 1.00e-12 3.02 0.05
pander::pander(sm$coefficients)
  Estimate lower HR upper u.Accuracy r.Accuracy full.Accuracy u.AUC r.AUC full.AUC IDI NRI z.IDI z.NRI Delta.AUC Frequency
ADAS11 1.91e-01 1.463 1.789 2.189 0.668 0.722 0.752 0.679 0.757 0.782 0.06175 0.539 5.96 5.24 0.025417 0.65
M_ST13TA -2.04e-01 0.572 0.659 0.760 0.657 0.742 0.766 0.668 0.766 0.794 0.04056 0.663 5.44 6.72 0.027437 0.75
RAVLT_immediate -3.44e-01 0.400 0.527 0.695 0.673 0.755 0.769 0.718 0.787 0.800 0.04894 0.628 5.36 6.54 0.013008 1.00
TAU 3.14e-01 1.224 1.465 1.753 0.655 0.748 0.762 0.638 0.782 0.793 0.03016 0.544 4.37 5.31 0.010720 0.80
M_ST56SA -2.16e-01 0.586 0.693 0.819 0.566 0.759 0.768 0.577 0.789 0.797 0.02960 0.468 4.31 4.59 0.008198 1.00
FAQ 2.46e-01 1.273 1.581 1.963 0.708 0.732 0.769 0.688 0.767 0.800 0.03459 0.371 4.22 3.55 0.032788 1.00
M_ST59CV -1.68e-13 0.693 0.780 0.876 0.614 0.751 0.766 0.628 0.779 0.792 0.01627 0.307 4.16 2.92 0.013338 0.05
M_ST59SA -8.52e-02 0.645 0.754 0.883 0.546 0.749 0.749 0.554 0.783 0.782 0.02014 0.445 3.96 4.32 -0.000775 0.30
RD_ST34CV -8.86e-02 0.683 0.779 0.888 0.520 0.759 0.777 0.542 0.786 0.806 0.01663 0.443 3.90 4.40 0.020088 0.65
RAVLT_perc_forgetting 7.07e-02 1.224 1.684 2.319 0.652 0.728 0.738 0.673 0.750 0.762 0.03863 0.520 3.85 5.13 0.012586 0.25
M_ST39CV -9.17e-14 0.814 0.873 0.936 0.650 0.756 0.764 0.642 0.783 0.794 0.00924 0.346 3.83 3.30 0.011278 0.05
ABETA -2.08e-01 0.541 0.679 0.853 0.609 0.782 0.769 0.672 0.808 0.800 0.02112 0.430 3.76 4.56 -0.007637 1.00
M_ST29SV -1.17e-01 0.500 0.643 0.826 0.673 0.751 0.752 0.692 0.777 0.782 0.02558 0.498 3.69 4.89 0.005547 0.60
M_ST11SV -1.56e-01 0.625 0.736 0.868 0.622 0.743 0.752 0.635 0.771 0.784 0.01769 0.375 3.66 3.60 0.013446 0.45
M_ST12SV -3.66e-02 0.581 0.711 0.869 0.673 0.721 0.739 0.679 0.739 0.762 0.02226 0.421 3.58 4.05 0.022628 0.10
M_ST24CV -1.02e-01 0.557 0.689 0.852 0.645 0.737 0.750 0.647 0.774 0.784 0.02191 0.436 3.50 4.20 0.010169 0.15
PTAU 1.38e-02 1.165 1.399 1.680 0.662 0.759 0.772 0.644 0.790 0.798 0.02007 0.392 3.44 3.75 0.007735 0.90
APOE4 3.15e-01 1.357 2.063 3.136 0.594 0.739 0.749 0.603 0.765 0.777 0.02337 0.409 3.41 3.94 0.011835 0.60
RD_ST15TS -5.97e-02 0.661 0.773 0.903 0.520 0.746 0.753 0.555 0.781 0.790 0.01487 0.390 3.36 3.96 0.008388 0.10
M_ST13CV -4.86e-13 0.682 0.786 0.907 0.629 0.765 0.758 0.647 0.793 0.787 0.01359 0.364 3.28 3.52 -0.006338 0.15
M_ST39SA -4.15e-14 0.904 0.940 0.978 0.655 0.746 0.751 0.655 0.775 0.783 0.00326 0.254 3.10 2.41 0.007519 0.05
M_ST14TS 5.94e-02 1.094 1.252 1.433 0.594 0.747 0.752 0.598 0.775 0.782 0.01306 0.257 3.07 2.44 0.007519 0.40
M_ST26CV -1.95e-13 0.620 0.749 0.905 0.637 0.749 0.731 0.643 0.772 0.755 0.01495 0.406 2.99 3.89 -0.017097 0.05
RD_ST49SA -8.66e-02 0.699 0.804 0.925 0.503 0.764 0.773 0.538 0.792 0.800 0.01102 0.258 2.95 2.53 0.007946 0.65
RD_ST34SA -1.02e-01 0.619 0.750 0.911 0.515 0.740 0.751 0.544 0.764 0.780 0.01448 0.172 2.80 1.66 0.016271 0.35
M_ST56CV -2.26e-02 0.694 0.782 0.881 0.645 0.741 0.749 0.653 0.768 0.775 0.01087 0.262 2.79 2.48 0.007591 0.55
MMSE -3.99e-02 0.610 0.745 0.911 0.685 0.721 0.738 0.672 0.743 0.762 0.01543 0.384 2.76 3.67 0.019400 0.10
ADAS13 1.24e-01 1.130 1.501 1.993 0.713 0.781 0.780 0.721 0.809 0.808 0.01274 0.203 2.44 1.92 -0.000754 0.90
pander::pander(bConvml$univariate[bConvml$selectedfeatures,])
  Name RName ZUni
FAQ FAQ FAQ 7.57
RAVLT_immediate RAVLT_immediate RAVLT_immediate 10.41
ABETA ABETA ABETA 8.51
M_ST56SA M_ST56SA M_ST56SA 4.71
ADAS13 ADAS13 ADAS13 10.85
PTAU PTAU PTAU 5.59
TAU TAU TAU 5.29
M_ST13TA M_ST13TA M_ST13TA 7.42
ADAS11 ADAS11 ADAS11 9.39
RD_ST34CV RD_ST34CV RD_ST34CV 2.53
RD_ST49SA RD_ST49SA RD_ST49SA 1.82
M_ST29SV M_ST29SV M_ST29SV 8.57
APOE4 APOE4 APOE4 3.97
M_ST56CV M_ST56CV M_ST56CV 7.17
M_ST11SV M_ST11SV M_ST11SV 5.89
M_ST14TS M_ST14TS M_ST14TS 5.15
RD_ST34SA RD_ST34SA RD_ST34SA 2.91
M_ST59SA M_ST59SA M_ST59SA 3.24
RAVLT_perc_forgetting RAVLT_perc_forgetting RAVLT_perc_forgetting 7.08
M_ST24CV M_ST24CV M_ST24CV 7.09
M_ST13CV M_ST13CV M_ST13CV 6.71
MMSE MMSE MMSE 7.13
M_ST12SV M_ST12SV M_ST12SV 8.36
RD_ST15TS RD_ST15TS RD_ST15TS 2.14
M_ST26CV M_ST26CV M_ST26CV 7.12
M_ST39CV M_ST39CV M_ST39CV 6.44
M_ST59CV M_ST59CV M_ST59CV 6.33
M_ST39SA M_ST39SA M_ST39SA 6.67

#ptestl <- predict(bConvml,TADPOLE_Conv_TEST,type="lp")
ptestl <- predict(bConvml,TADPOLE_Conv_TESTNorm,type="lp")
boxplot(ptestl~TADPOLE_Conv_TEST$status)

#ptestr <- predict(bConvml,TADPOLE_Conv_TEST,type="risk")
ptestr <- predict(bConvml,TADPOLE_Conv_TESTNorm,type="risk")
eventCases <- subset(TADPOLE_Conv_TEST,status==1)
plot(1.0/ptestr[rownames(eventCases)]~eventCases$TimeToEvent)

pander::pander(cor.test(eventCases$TimeToEvent,1.0/ptestr[rownames(eventCases)],method="spearman"))
Spearman’s rank correlation rho: eventCases$TimeToEvent and 1/ptestr[rownames(eventCases)]
Test statistic P value Alternative hypothesis rho
18210 0.000551 * * * two.sided 0.44



perdsurv <- as.data.frame(cbind(Times=TADPOLE_Conv_TEST$TimeToEvent,
                  Outcome=TADPOLE_Conv_TEST$status,
                  LinearPredictors=ptestl,
                  ptestr))
boxplot(perdsurv$LinearPredictors~perdsurv$Outcome)

prSurv <- predictionStats_survival(perdsurv,"BSWiMS: MCI to  AD Conversion")

pander::pander(prSurv$CIRisk)
median lower upper
0.874 0.834 0.908
pander::pander(prSurv$CILp)
median lower upper
0.899 0.846 0.94
pander::pander(prSurv$spearmanCI)
50% 2.5% 97.5%
0.439 0.203 0.634

prBin <- predictionStats_binary(cbind(TADPOLE_Conv_TEST$status,ptestl),"BSWiMS: MCI to  AD Conversion")

pander::pander(prBin$aucs)
est lower upper
0.899 0.853 0.944
pander::pander(prBin$CM.analysis$tab)
  Outcome + Outcome - Total
Test + 56 34 90
Test - 2 78 80
Total 58 112 170





par(op)
ho <- mean(TADPOLE_Conv_TRAIN$status)
timeInterval <- mean(TADPOLE_Conv_TRAIN[TADPOLE_Conv_TRAIN$status==0,"TimeToEvent"])
pgzero <- ppoisGzero(perdsurv$LinearPredictors,ho)
rsdata <- cbind(perdsurv$Outcome,pgzero,perdsurv$Times)
riskAnalysis <- RRPlot(rsdata,riskTimeInterval=timeInterval,title="Test")
#> [1] 0.3411765
#> [1] 0.3411765 1.0000000

#> [1]  0.8996088  0.9408211  0.4599589  3.5649262  6.6280369 14.8752056  1.0000000
#> [8]  0.9534954



pander::pander(riskAnalysis$keyPoints)
  Thr RR RR_LCI RR_UCI SEN SPE BACC NetBenefit
@:0.9 0.480 4.71 2.963 7.50e+00 0.724 0.889 0.807 0.155
@:0.8 0.311 10.66 4.525 2.51e+01 0.914 0.781 0.847 0.235
@MAX_BACC 0.285 46.28 6.586 3.25e+02 0.983 0.738 0.860 0.256
@MAX_RR 0.186 300.69 0.614 1.47e+05 1.000 0.571 0.786 0.271
@SEN100 0.186 300.69 0.614 1.47e+05 1.000 0.571 0.786 0.271
p(0.5) 0.500 4.84 3.045 7.69e+00 0.724 0.899 0.812 0.153

pander::pander(riskAnalysis$c.index)
  • C Index: 0.874

  • Dxy: 0.747

  • S.D.: 0.0383

  • n: 170

  • missing: 0

  • uncensored: 58

  • Relevant Pairs: 13252

  • Concordant: 11576

  • Uncertain: 15470

  • cstatCI:

    mean.C Index median lower upper
    0.874 0.875 0.833 0.908
pander::pander(riskAnalysis$ROCAnalysis$aucs)
est lower upper
0.899 0.853 0.944
pander::pander(riskAnalysis$cenAUC)

0.928

pander::pander(riskAnalysis$ROCAnalysis$ClassMetrics)
  • accci:

    50% 2.5% 97.5%
    0.806 0.747 0.865
  • senci:

    50% 2.5% 97.5%
    0.73 0.607 0.84
  • speci:

    50% 2.5% 97.5%
    0.849 0.78 0.911
  • aucci:

    50% 2.5% 97.5%
    0.789 0.722 0.851
  • berci:

    50% 2.5% 97.5%
    0.211 0.149 0.278
  • preci:

    50% 2.5% 97.5%
    0.714 0.597 0.823
  • F1ci:

    50% 2.5% 97.5%
    0.721 0.625 0.8
pander::pander(riskAnalysis$surdif)
Call: survival::Surv(eTime, eStatus) ~ class Chisq = 83.430643 on 2 degrees of freedom, p = 0.000000
  N Observed Expected (O-E)^2/E (O-E)^2/V
class=0 88 5 35.87 26.57 71.78
class=1 23 11 7.65 1.46 1.69
class=2 59 42 14.47 52.37 72.24

1.3.1 The formula network

cmax <- apply(bConvml$bagging$formulaNetwork,2,max)
mcoef <- bConvml$bagging$bagged.model$coefficients
cnames <- names(cmax[cmax>=0.025])
#cnames <- cnames[abs(mcoef[cnames])>1.0e-10]
cmax <- cmax[cnames]
adma <- bConvml$bagging$formulaNetwork[cnames,cnames]

adma[adma<0.15] <- 0;
gr <- graph_from_adjacency_matrix(adma,mode = "undirected",diag = FALSE,weighted=TRUE)
gr$layout <- layout_with_fr

fc <- cluster_optimal(gr)
plot(fc, gr,
     edge.width=5*E(gr)$weight,
     vertex.size=20*cmax,
     vertex.label.cex=0.55,
     vertex.label.dist=0,
     main="MCI to Dementia Conversion")

par(op)